- This field will be set by the `cargo rustc` command, only if one target is being compiled
- The field can not be read from the Cargo.toml
pub opt_level: u32,
pub lto: bool,
pub codegen_units: Option<u32>, // None = use rustc default
+ pub rustc_args: Option<Vec<String>>,
pub debuginfo: bool,
pub debug_assertions: bool,
pub rpath: bool,
opt_level: 0,
lto: false,
codegen_units: None,
+ rustc_args: None,
debuginfo: false,
debug_assertions: false,
rpath: false,
profile: &Profile,
crate_types: &[&str]) {
let Profile {
- opt_level, lto, codegen_units, debuginfo, debug_assertions, rpath, test,
- doc: _doc,
+ opt_level, lto, codegen_units, ref rustc_args, debuginfo, debug_assertions,
+ rpath, test, doc: _doc,
} = *profile;
+ let _ = rustc_args;
// Move to cwd so the root_path() passed below is actually correct
cmd.cwd(cx.config.cwd());
opt_level: opt_level.unwrap_or(profile.opt_level),
lto: lto.unwrap_or(profile.lto),
codegen_units: codegen_units,
+ rustc_args: None,
debuginfo: debug.unwrap_or(profile.debuginfo),
debug_assertions: debug_assertions.unwrap_or(profile.debug_assertions),
rpath: rpath.unwrap_or(profile.rpath),